<script setup>

           const title = "技术社区";
           const activeIndex= 0;
           const keywords= "";
           const user= null;
            // user: {
            // 文章列表
           const articleList= [
              { title: "Vue3.0新特性使用攻略", date: "2025-10-21" },
              { title: "Vue3.0新特性使用攻略", date: "2025-10-21" },
              { title: "Vue3.0新特性使用攻略", date: "2025-10-21" },
              { title: "Vue3.0新特性使用攻略", date: "2025-10-21" },
            ];
            // 课程列表
           const courseList= [ 
              { title: "零基础学习Vue3.0", price: "2025-10-21" },
              { title: "零基础学习Vue3.0", price: "2025-10-21" },
              { title: "零基础学习Vue3.0", price: "2025-10-21" },
              { title: "零基础学习Vue3.0", price: "2025-10-21" },
            ];
            // 商品列表
           const productList= [
              { type: "徽章", name: "IT社区文创 ：「代码新秀闪耀」 荣誉徽章", price: 10, stock: 200, img: "./static/images/product01.png" },
              { type: "帆布包", name: "【it社区文创】「极简主义」帆布包", price: 50, stock: 100, img: "./static/images/product02.png" },
              { type: "T恤", name: "蓝字魔法，解锁IT新风尚——百搭T恤衫", price: 60, stock: 100, img: "./static/images/product03.png" },
              { type: "笔记本", name: "高端皮质IT笔记本，简约设计尽显专业气质", price: 30, stock: 50, img: "./static/images/product04.png" },
            ];
</script>

<template>
    <el-container>
        
        <el-main class="main">
          <el-carousel height="420px">
            <el-carousel-item>
              <img src="./static/images/carousel1.png" />
            </el-carousel-item>
            <el-carousel-item>
              <img src="./static/images/carousel2.png" />
            </el-carousel-item>
            <el-carousel-item>
              <img src="./static/images/carousel3.png" />
            </el-carousel-item>
          </el-carousel>
          <el-row  style="margin-top: 20px">
            <el-col :span="8">
              <div>
                <el-text size="large" type="primary">热门文章</el-text>
                <el-button size="small" style="float: right; margin-right: 20px">查看更多</el-button>
              </div>
              <ul>
                <li v-for="(item,i) in articleList" :key="i">
                  <p>{{item.title}}</p>
                  <el-text size="small" type="success">{{item.date}}</el-text>
                </li>
              </ul>
            </el-col>
            <el-col :span="8">
              <div>
                <el-text size="large" type="primary">热门课程</el-text>
                <el-button size="small" style="float: right; margin-right: 20px">查看更多</el-button>
              </div>
              <ul>
                <li v-for="(item,i) in courseList" :key="i">
                  <p>{{item.title}}</p>
                  <el-text size="small" type="danger">{{item.price}}</el-text>
                </li>
              </ul>
            </el-col>
            <el-col :span="8">
              <div>
                <el-text size="large" type="primary">热门商品</el-text>
                <el-button size="small" style="float: right; margin-right: 20px">查看更多</el-button>
              </div>
              <el-carousel height="240px">
                <el-carousel-item v-for="(item,i) in productList" :key="i">
                  <img :src="item.img" />
                </el-carousel-item>
              </el-carousel>
            </el-col>
          </el-row>
        </el-main>
    </el-container>
</template>

<style></style>